package xiancheng.sleep;

/**
 * @author Mr.ma
 * @since 2022/11/1 15:22
 * sleep方法
 **/
public class Test05 {
    public static void main(String[] args) {
        System.out.println("倒计时开始：");
        for (int i = 10; i > 0; i--) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("i = " + i);
        }
    }
}
